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`