I'm wondering if there is a specific word describing this trait. For example if I tend to think that 'If I pass this exam I am a genius, if I fail I am an utter imbecile'?
A Flip-flopper (U-turn in the UK) is used to describe someone who frequently changes their opinions. It's often used to describe politicians who change their stances to go with the current popular sentiment.
Someone who wavers on their opinions and can't make up their mind is said to be vacillating or indecisive.
A person who changes loyalty based on whether or not something is succeeding is referred to as fair-weather - particularly the fair-weather fan when speaking about a sports team supporter.
Fickle (“Quick to change one’s opinion or allegiance; insincere; not loyal or reliable”) and compliant (“Willing to comply; yielding; bending; pliant; submissive; willing to do what someone wants”) are possibilities. Mercurial (“Volatile; erratic; unstable; flighty; fickle or changeable in temperament”) and capricious (“Impulsive and unpredictable; determined by chance, impulse, or whim”) also are nice.
• Word describing the reversal of emotions,
• What word should I use for something that fails intermittently?,
• What do you call someone who likes variety?,
• Word to describe “fleeting, wandering and prone to drifting off” of thought
Well, you might call that low self-esteem if you base your self-worth on one exam. :)
But if you want a cool word, there is tergiversate, which means "to change repeatedly one's attitude or opinions with respect to a cause, subject, etc." And one who practices tergiversation is called a tergiversator.
jwpat7's fickle is a good word for someone who changes his opinion easily - but it's invariably derogatory, and implies changing one's opinion without good cause.
There's also open-minded, with positive associations implying that one is able and willing to accept new information which justifies changing one's opinion.
Those are answers to the question in OP's title. But they don't fit the example context, of someone basing his entire self-assessment on a single test score. That's a type of cognitive distortion often called Polarized (or “Black and White”) thinking.
As I mentioned in my comment, I believe your example doesn't match your question. The example as given isn't an example of indecision, or a fickle opinion, but rather it's insecurity.
If you don't know before you take a test whether you are a genius or an imbecile, you are insecure about the level of your intelligence. Other possible descriptions of such a person could be anxious, apprehensive or unconfident.
It is a technical term describing a type of Cognitive Distortion, where the experiences of life get flattened out into excluding a middle ground. There are no "shades of grey" or complexity, it's either all or none, good or bad, black or white.
As for just using an adjective to fit within the constraints of grammar, I would use polarized.
I have to say it, because no-one else has: Devil's Advocate
In my own words: Someone who will opt for the less popular side of an argument in order to draw out a more critical approach to the argument. A good
devil's advocate could quite happily change their allegiance mid-argument if they've managed to convince you one way.