Almost any creature could escape before suffocating
In most circumstances, the victim would have ample time to chisel their way out.
Wall of Stone creates 10 foot panels (or larger). So let’s assume: (1) your spellcaster trapped their victim in the minimum size, 10' cube, and (2) they concentrated on the spell for 10 minutes, making the stone permanent.
I’m not aware of any rules that would cover suffocation in these conditions, so let’s fall-back on real-world facts. This Friday Fiction Facts: Trapped in an airtight room! article calculates it would take hours]for a person to suffocate in those conditions
“A moderately active or stressed person” would have about 17 hours until they experience symptoms such as “panting, dizziness, severe headache, vision disturbances” at which point we will assume they can not longer effectively chisel at the wall.
The wall is an object made of stone that can be damaged and thus
breached. Each panel has AC 15 and 30 hit points per inch of
thickness.
At 30 HP/inch times 6 inches, the victim needs to do 180 HP of damage to the AC 15 wall to escape.
Let’s assume our victim is a human commoner with no strength bonus. We’ll even take away their club listed in their stat block, and just give them an improvised weapons, with which they get no attack bonus. Each round, they can do 1d4 points of damage to the wall if they “hit” with a roll of 15 or higher.
With those assumptions, the commoner’s average damage-per-round would be 0.75 HP. On average (and with this many “rolls,” most attempts would be very close to average) it would take 240 rounds to chisel out.
A round is 6 seconds; there are 600 rounds in an hour, so our mild-mannered commoner can chisel free in 0.4 hours, or 24 minutes.
- (240 rounds) / (600 rounds per hour) = 0.4 hours = 24 minutes for a commoner to escape
So even if we make assumptions that our victim needs to rest three-quarters of the time they still get out with hours to spare.
If you are trapping an armed and dangerous creature, they are likely to be able to escape in even less time.
Edge cases
It’s easy to come up with edge cases where someone would not be able to dig out, or if the wall were made double thick, or more (which would require a lot of time since you have to concentrate for 10 minutes for each effect). In these cases the rules pretty much silent (the Portable Hole mentions death by suffocation in an enclosed space, but that’s a pretty different case).
Would there be tiny cracks in the wall, or the floor beneath it that allow air to seep in (like there are in the building where you sleep)? I think that is simply up to the DM. This is a world where you can breathe miles deep in the Underdark — the whole “how do we breathe” issue gets a little glossed over.
Squeezing
what if you arrange your panels so there's a section only 2" wide? Is the creature squeezed between the walls?
First, the space a creature takes up is not the same as the size the creature controls.
A creature's space is the area in feet that it effectively
controls in combat, not an expression of its physical
dimensions. A typical Medium creature isn't 5 feet
wide, for example, but it does control a space that
wide. If a Medium hobgoblin stands in a 5-foot-wide
doorway, other creatures can't get through unless the
hobgoblin lets them. (PHB 192)
The rules on squeezing are pretty clear for most cases:
A creature can squeeze through a space that is large
enough for a creature one size smaller than il. Thus, a
Large creature can squeeze through a passage that's
only 5 feet wide. While squeezing through a space,
a creature must spend 1 extra foot for every foot it
moves there, and it has disadvantage on attack rolls
and Dexterity saving throws. Attack rolls against the
creature have advantage while it's in the smaller space. (PHB 192)
So, a medium creature can squeeze into a space that is Small, which according to DMG page 6 is a 2.5x2.5 ft square it controls.
Squishing
2 feet is less than 2.5 feet so what happens? The rules simply don't say, and a ruling is necessary. So here are some options the DM might rule.
The Creature Takes Bludgeoning Damage
The DM could rule that like in real life when getting stuck in a space that's too small, the creature gets squished into the space, all the things of being squeezed applied, and take some amount of bludgeoning damage. They may also say the space so cramped he's not just losing a foot of movement, but maybe he's in difficult terrain or even restrained.
The Creature is Pushed The Other Way
The DM could rule there isn't enough room and spell isn't a damage spell, and the spell simply shunts them the other way instead.
The Creature is Squeezed
The DM could rule that sizes are an approximation and abstraction. All medium creatures fit inside of a 5' square, but maybe the elf has a slight enough frame can squeeze not only into a 2.5' square but even into a 2' square. The DM could continue that logic to even smaller spaces if they felt appropriate.
Best Answer
Your GM decides who decides where the creature goes
Unfortunately it doesn't say how to determine which side of the wall a creature ends up on, but a reasonable assumption would be to rule it identically to wall of force and wall of stone, that is, the caster decides. Of course, this part is not explicitly stated and so it is ultimately left up to the GM.
A creature does not get a save against being surrounded by a wall of ice (or a wall of force)
wall of stone actually goes on to say:
There is an explicit saving throw that allows a creature the chance to escape from wall of stone. A wall of force or wall of ice does not grant such a nicety to those trapped. If they did they would say so, they do not say so, so they do not. Spells do only and exactly what they say (barring GM fiat of course)