From a fairway bunker, most amateurs become greedy and try to knock it on, no matter how poor the lie. But unless the conditions are favorable for a shot at the green, your primary goal should be to get the ball back in play.
(You don't want to make a bad situation worse.) To help you do that, here are several factors to consider, as well as some tips to help you pick it clean.
First and foremost, make sure you have enough loft to clear the lip. To check, stand behind the bunker and step on the head of the club you plan to use. The angle of the shaft (see photo) is roughly equal to the trajectory the ball will take when leaving the sand. If the shaft is pointing into the lip, use a club with more loft.
•Take one more club (i.e., 6-iron rather than 7-iron) than you'd normally hit for the shot's distance.
•Play the ball near the middle of your stance to ensure ball-first contact.
•Widen your stance and dig your feet firmly in the sand.
•Grip down an inch on the handle.