You don't always get a flat lie when your ball finds a bunker. Hilly lies in the sand require adjustments in technique to help you get the ball close to the hole.
UPSLOPE
When the ball is on an upslope, a normal explosion swing is risky: It's easy to take too much sand and pop the ball up without enough carry to reach the pin -- or even the green. Counter this by adjusting your stance to fit the slope. With an open clubface, stand open with the ball slightly farther back than usual. Drop your left shoulder lower than your right: This allows you to swing up along the slope with your arms, so you cut a shallow divot and get the carry you need. The ball will still come out higher, so don't expect much roll.
DOWNSLOPE
Although hitting the ball off the downslope is a more difficult shot than off the upslope, the idea is the same: Adjust your stance to fit the hill. Your stance and clubface should be a little more open than usual, and the ball slightly forward in your stance. Keep your left shoulder high and make a steep, upright backswing by lifting the club with your hands and arms. On the downswing, focus on two things to avoid hitting the ball thin: Maintain your knee flex and try to dig sharply behind the ball. There's little chance of taking too much sand off the downhill lie.
BALL ABOVE FEET
The key to sidehill lies is adjusting your stance and setup to make your swing as "normal'' as possible.
When the ball is above your feet, don't lean back or try to swing on a flatter plane. Stand as you would for a normal lie, but choke down to the bottom of your grip to counter the change in elevation. With an open clubface, take the club back outside the target line and then swing through along the line of your open stance. If you let your left hand pass over the right, the slope will send the ball right, so keep your hands quiet as the club cuts through the sand.
BALL BELOW FEET
Like the downhill lie, this one is the more difficult shot. For the most normal swing, avoid bending excessively from the waist to reach the ball. Instead, grip at the end of the club and flex your knees to lower yourself. With an open stance and clubface, swing the club back with your arms, then swing through along the line of your feet. To make sure you stay down, drive your knees toward the target through impact. The slope will send the ball to the left if your hands are too lazy, so concentrate on releasing the club as you splash the ball out.