You have an issue because whatever method you used to pick random rows is producing repeated values. If you use the permutation table as mentioned it creates a shuffled set of numbers with no repeats so you can use this to take values from the array.
You can send the UID of the sprite clicked through the function as a param, and then within the function if answer is correct select sprite by UID and set it to green.