This exact situation happened near Fairbanks just a couple years ago. A 172 pilot with 4 people, at 5,000ft got into a situation where he couldn't out climb the terrain, couldn't turn around. He flew the plane into the slope at Vx and full power. His climb angle was close enough to the angle of the slope that everyone on board walked away. The plane was not so lucky, but that's the least of your worries in that situation.
I've seen multiple studies showing that crash survival rate is inversely proportional to impact angle. So if you have to fly it into rising terrain I'd have to say you're best bet is what the 172 pilot did. Vx is going to be your slowest speed, and shallowest impact angle. For example in my 150, V0 is 54 mph, that's power off, full flaps stall. But Vx is only 51mph, flaps retracted, full power.
Definitly pick up a copy of the Mountain Flying Bible. It's got a lot of information on how to avoid this situation, how to get out of it, and what to do if you can't. Besides, practicing canyon turns is a real kick!
Phil