SELECT
ImageID,
MAX(CASE WHEN SVGProperty='Line0001' THEN SVGPropertyValue END) as Line0001,
MAX(CASE WHEN SVGProperty='Line0002' THEN SVGPropertyValue END) as Line0002,
MAX(CASE WHEN SVGProperty='Line0003' THEN SVGPropertyValue END) as Line0003,
MAX(CASE WHEN SVGProperty='Line0004' THEN SVGPropertyValue END) as Line0004,
MAX(CASE WHEN SVGProperty='Line0005' THEN SVGPropertyValue END) as Line0005
FROM SVGProperties
WHERE ImageID IN(1,2,3,6)
GROUP BY ImageID