Making a bad decision causes bad consquences.
Not studying for a test causes a bad test grade.
I don't see any following options to answer your questions.
This probably means that something you had planned to turn out well, ended up going against you. The scenario flipped it's self around and you were so said "betrayed" by your own plan or game.