This is one of those \'oh my god\' moments.
The previous programmer in our company has left behind a badly-coded application using PHP and MySQL.
One example
What about creating a table that correctly breaks the CSV column into multiple columns (or multiple records) once as a batch process, and then cobbling together an update trigger on the old table to refresh the entry (or entries) for that user? Then you could write decent queries across it without having to re-code the setter logic.