This arose from an exercise in futility - if you find it useful...
Code:
SET @sl = '1'; -- spell level
SET @qstr = CONCAT('SELECT \'', @sl, '\' level, `id`, `name`, `targettype` target_type, `SpellAffectIndex` spell_effect_index FROM `spells_new` WHERE \'', @sl, '\' IN (', (SELECT GROUP_CONCAT(CONCAT('`',`COLUMN_NAME`,'`') ORDER BY `ORDINAL_POSITION` SEPARATOR ',') FROM `information_schema`.`COLUMNS` WHERE (`table_schema` = DATABASE() AND `TABLE_NAME` = 'spells_new' AND `COLUMN_NAME` LIKE 'classes%')), ') ORDER BY `name`');
PREPARE stmt FROM @qstr;
EXECUTE stmt;