You can give the buttons numbers, and put those in array. Then checking if the answer is correct, is just a matter of comparing arrays:
When they push a button, you can say:
The only thing you have to watch out for is putting more than 3 ( or however many buttons you have ) buttons in the array. So, always clear the array before they have an attempt: