When you slide a creature, there’s no restriction on the direction you can move it.
• Two-Dimensional: Forced movement is normally two-dimensional; all the squares of the movement must be on the same horizontal plane. Forced movement can become three-dimensional when the target is flying, is moved through a substance such as water, or is on a non-horizontal surface, such as an incline, that supports it. This means an earthbound target cannot normally be pushed to a square in the air, but a hovering target can be. Similarly, a target can be pulled down a flight of stairs, and it can be slid in any direction underwater.
Published in Player's Handbook, page(s) 285, Monster Manual, page(s) 283.