You need to test as many columns as you need to test.

If you have an array of column names the loop through that array.

You don't explain how you know what the order should be or what the fieldnames are.