I have a table [mapping] with 2 columns similar to below
id | values 1 | 1,2 2 | 1,2,3 3 | 1,1 4 | 1,1,2
and another table [map] is si
SELECT `ids`.`id`, GROUP_CONCAT(`values`.`texts`) AS texts FROM `ids` INNER JOIN `values` ON FIND_IN_SET(`values`.`id`, `ids`.`values`) GROUP BY `ids`.`id`
It works like this: Example