Idiom or phrase about a situation in which a person has little hope
I think you are referring to the choice between the:
lesser of two evils:
the less bad thing of a pair of bad things.
- I didn't like either politician, so I voted for the lesser of two evils. Given the options of going out with someone I don't like and staying home and watching a boring television program, I chose the lesser of the two evils and watched television.
(McGraw-Hill Dictionary of American Idioms and Phrasal Verbs)
"between the devil and the deep blue sea" means between two dangers and by avoiding one there's danger of falling into another.
from Wikipedia - "Between the devil and the deep blue sea" is an idiom meaning a dilemma—i.e., to choose between two undesirable situations (equivalent to "between a rock and a hard place").
from TFD - if you are between the devil and the deep blue sea, you must choose between two equally unpleasant situations.
e.g.
-
"If I pay the rent I won't have any money for food. I'm really between the devil and the deep blue sea."
-
"For most people a visit to the dentist is like a choice between the devil and the deep blue sea - if you go you suffer, and if you don't go you suffer."