Usually this is not done, denormalizing the data in this way, you lose all the advantages of the DBMS: processing speed, a rich and flexible set manipulation language. At the same time, you keep all the flaws: complex and old SQL query language, created at a time when developer time was cheap and computer - expensive, poor and unproductive string manipulation.
If you want to extract all the benefits from MySQL, you'd better normalize the schema.
- records from table
А store unique numeric id = 3, 8, 67, 75, 100 - in table
B each identifier from the set list=(3,67,8) has a separate row
for example
1 3 2 67 3 8
With this organization of data, you get the ability to process using all of the SQL mechanisms (subqueries, connections, multiple set processing operators). If it is not convenient for you to rework table B , get an intermediate table С , where you store the data in a normalized form - believe, despite the apparent additional complexity, it will pay off when using and maintaining the application.