“I don’t know what to do. If I take my dream job, I’ll have to leave my boyfriend and move to the city. But if I stay here with him, I have to keep doing this lousy job.”
“Sounds like you’re really stuck between a rock and a hard place.”

A rock and a hard place are two bad options. A rock is hard, so they are basically the same. If you have a choice, but both options are equally bad, you can use this idiom.