detect which button is pressed and use that value in switch statement?

I get the first part, but the second part, using the value, is something new for me:

"Use this value as the row index to a 2 dimensional array with the columns holding the values (HIGH or LOW) to be output to the relays.

Iterate through the columns of the selected row of the array and set the outputs appropriately"

Is there a sample you can refer to so I can learn this part?