If I found myself in a dungeon, using fairy tale logic, I would try to find some kind of magical door that would lead me to an escape route in what may be the dungeon’s abandoned tunnels or sewers.
What I’m imagining is similar to the opening of one of my old favorite video games, Oblivion. In the beginning of Oblivion you are imprisoned and you find an escape route inside the dungeon cell. It’s dark, and wet, and some weird creatures live down there. Incorporating fairy tale logic, I would bet that there is some sort of secret door leading to a secret tunnel that leads out of the dungeon. I would probably try to look for something that maybe looks a little bit different on the outside, or something with more cracks and feel around that area. Or I’m imagining it’s like Harry Potter and the Sorcerer’s Stone where Hagrid taps his umbrella on the bricks and the door to Diagon Alley opens up. It might take me a little while to get out of the dungeon, but fairy tale logic is always helpful in the magical world.