Use Concat en Group_concat
SELECT GROUP_CONCAT(
CONCAT(
'{ID:', ID,
',ParentID:', ParentID,
'}'
) SEPARATOR ","
) FROM table
Cute Caterpillar
SELECT GROUP_CONCAT(
CONCAT(
'{ID:', ID,
',ParentID:', ParentID,
'}'
) SEPARATOR ","
) FROM table
SELECT
CONCAT(`Name`, ':', GROUP_CONCAT(`Value` SEPARATOR ',')) AS `Name`
FROM table
GROUP BY `Name`