Conditional Loops

Is it possible to program a conditional loop into a mission? For instance, if the battery level is above a set point, go to waypoint #?. Otherwise, land.