@Barmar brings up a good point that product id and names should be grouped together. The following code makes that assumption, and that id/names are not unordered:
WITH RankedAttributes AS (
SELECT
Value AS ProductValue,
ROW_NUMBER() OVER (ORDER BY NULL) AS rn,
Attribute
FROM your_table_name
),
GroupedAttributes AS (
SELECT
MAX(CASE WHEN Attribute = 'product_id' THEN ProductValue END) AS product_id,
MAX(CASE WHEN Attribute = 'product_name' THEN ProductValue END) AS product_name
FROM RankedAttributes
GROUP BY (rn - ROW_NUMBER() OVER (PARTITION BY Attribute ORDER BY rn))
)
SELECT product_id, product_name
FROM GroupedAttributes
WHERE product_id IS NOT NULL;