Wall of Stone says:
You shape a wall of solid stone. You create a 1-inch-thick wall of stone up to 120 feet long, and 20 feet high. You can shape the wall's path, placing each 5 feet of the wall on the border between squares. The wall doesn't need to stand vertically, so you can use it to form a bridge or set of stairs, for example. You must conjure the wall in an unbroken open space so its edges don't pass through any creatures or objects, or the spell is lost.
I'm not sure if I'm just carrying over interpretations from other systems or not, but can Wall of Stone be used to enclose a creature in a box? Not, not just a cage (which the spell obviously can use), but a box with a roof over it and everything. It doesn't really seem like a "wall" to me, but if the wall can "twist" (i.e. change from vertical to horizontal orientation), then it seems like you could start with the cage, and then continue the "wall" off the top of the last segment of the cage. Thoughts?