Por favor, use a consulta abaixo,
select col2, GROUP_CONCAT(col3) from data group by col2;
Abaixo está o caso de teste,
https://dbfiddle.uk/?rdbms=mysql_8.0&fiddle=ab35e8d66ffe3ac6436c17faf97ee9af
select col2, GROUP_CONCAT(col3) from data group by col2;