1.) I wish I were the Queen of England.
2.) I wish I was the Queen of England.
If I leave off the "I wish" part, then the first sentence definitely doesn't work. One would never say, "I were the Queen." Where were is to plural (we were, you were, they were), was is to singular (I was, you were, he was, she was, it was). Same goes for an "if" phrase...
3.) If I were the Queen, I'd have my own library.
4.) If I was the Queen, I'd have my own library.
Admittedly, I don't think the sentences above, numbers 2 and 4, sound right, but I've critiqued a lot of work and read many traditionally published books where this was the usage. However, *Grammarly.com says, "It's never correct."
Want to know why? Apparently, it has to do with wishful thinking, statements that aren't true, and a verb's mood. When you see sentences starting with the idea of wishing for something, (I wish, Sheila wishes) and the word "If," those are huge clues to use "were." For deeper insight, let me guide you to some helpful resources, because when I see a word like "subjunctive" I know I'm sailing off the deep end.
Here are some sites I visited to better explain the matter:
Subjunctive Definition and Usage by Dictionary.com
Subjunctive Verbs by Grammar Girl
When to Use "If I was" vs. "If I were" by English Language and Usage Stack Exchange
"Grammar is a piano I play by ear." ~ Joan Didion