The opposite meaning or outcome from what was expected is irony.
Irony is used when you want to show something completely different than what you expected. Simile is a figure of speech used to compare things using words such as like or as. Metaphor is similar to simile in that it compares things, but doesn't use words such as like or as. Symbolism refers to the use of symbols to denote hidden meanings of words.