select distinct substring_index(substring_index(a.m, ','
, b.help_topic_id + 1), ',', -1) m,
a.f
from mm a
join
mysql.help_topic b
on b.help_topic_id < (length(a.m) - length(replace(a.m, ',', '')) + 1)
where type = 2
// m -> 1,2,3