What is the meaning of [Of two evils choose the least]

“If you are forced to choose between two options, both of which are undesirable, all you can do is choose the one that is less undesirable than the other.”