The flight planning exercise will be something along the lines of,
"You are conducting a return flight from A to C to A". "You are overhead point B and you have a warning light come on and you must land at the next suitable airport" What is a suitable airport? Well you will have manual and you have to decided what is suitable and what isn't. You may or may not elect to land and the next "available" airport because it may not be "suitable". You also have to think about curfew's and crew flight time limitation as well.
Get the idea?