The simplest method would be to use a string variable.
Each input set the variable to the current value and the new input.
On input variableString set value to variableString& input
You would also need a counter to tell it when to check.
When it's time to check, compare varaibleString to another variable with the correct order.
Newt has the solution with one suggestion. An array.
As they turn the switches on, build a string of switch numbers. When the last one has been turned on, compare that to a string in an array. This way, you can have as many sequences as you wish.