**Neither a teacher nor a native speaker.**
As far as I know:
I wish I had passed the exam. :tick:
I wished I had passed the exam. :cross:
Some days ago you had an exam but did not pass it.
I wish I passed the exam. :tick:
You will have an exam, but you're pretty sure you will not pass it.
Wish stays wish, but the rest - depending on tense - must be changed.
P.S. Wishes is the exception, like "He wishes he had passed the exam." :tick:
Cheers!