Automating test entry choices while answers order always changes?

So I have a site with online tests from my university, and they are done in such a way, that if you choose a wrong answer to a question, you can go back and choose another one, and so until you choose the right one. But every time you choose the wrong answer the order of the choices changes.

I had an idea of automating the test entries with selenium webdriver and java, but it turns out that writing a program that compares the entry it did in the previous iteration with the current choices(changed in order) is not that simple! I've already written the code for extracting the information from the web page, but I don't know how to make the comparison.

Basically, I have a list of extracted answer choices to a question(typically 4) and I'm asking how do I submit a choice and then if it's wrong, keep it somewhere and compare it to the choices(changed in order) and choose something that's not the same? I know it's kind of complicated, but if you guys at least give me a direction it would be awesome, cause I don't even know what to search for this.