3 solutions (UNION, UNPIVOT and CROSS APPLY)
UNION\n\nWITH cte_p AS (\nSELECT product_id , \'store1\' as store, store1 as price\nFROM Products\nUNION ALL\nSELECT product_id , \'store2\' as store, store2 as
UNION\n```\nWITH cte_p AS (\nSELECT product_id , \'store1\' as store, store1 as price\nFROM Products\nUNION ALL\nSELECT product_id , \'store2\' as store, store2 as price\nFROM Products\nUNION ALL\nSELECT product_id , \'store3\' as store, store3 as price\nFROM Products\n)\nSELECT *\nFROM cte_p\nWHERE price IS NOT NULL\n```\nUNPIVOT\n```\nSELECT product_id, store, price\nFROM Products\nUNPIVOT\n(\n  price\n  for store in (store1, store2, store3)\n) unpiv\n```\nCROSS APPLY\n```\nSELECT product_id, store, price \nFROM Products\nCROSS APPLY\n(\n  VALUES\n    (\'store1\', store1),\n    (\'store2\', store2),\n    (\'store3\', store3)\n) c (store, price)\nWHERE price IS NOT NULL\n```
['Union Find']