With the new Array-type variables which I think have happened since this original question, along with the new-ish @Vernalis Configurable IF/CASE... nodes, it is possible to do this with no scripting requirements:

The Extract Column Header / GroupBy / Table Row to Variable sequence puts the column names into an array variable, and then the Configurable IF/CASE Switch (Flow Variable Value) node can test various options for members of the array, including the selected Any Equals option for an exact match:
NB Also the options around case sensitivity etc
See If Column Exists – KNIME Community Hub for example workflow
Steve
