This question already has an answer here:
Is there a word in English language to express the feeling of being happy that something bad happened to someone else rather than you?
I can maybe describe it best as the opposite of survivor's guilt, but I am really struggling to find the right term...
EDIT: There was a suggestion that my question is a duplicate of this one. However, they are different in the way that in my question there is no sadistic component to it, or gloating at the misfortune of others. The focus of my question lies in the fact that you feel happy bad thing happened to the other person and not you. That's why I described it as the opposite of survivor's guilt.