Using PIVOT
SELECT *
FROM(
SELECT id_request, Alert_Outcome, ROW_NUMBER() OVER(PARTITION BY id_request ORDER BY Alert_Outcome) AS rn
FROM Test
)
PIVOT (MAX(Alert_Outcome) FOR rn IN (1 AS Alert1, 2 AS Alert2, 3 AS Alert3))
ORDER BY id_request;
Using Conditional Aggregation
SELECT
id_request,
MAX(CASE WHEN rn = 1 THEN Alert_Outcome END) AS Alert1,
MAX(CASE WHEN rn = 2 THEN Alert_Outcome END) AS Alert2,
MAX(CASE WHEN rn = 3 THEN Alert_Outcome END) AS Alert3
FROM(
SELECT id_request, Alert_Outcome, ROW_NUMBER() OVER(PARTITION BY id_request ORDER BY Alert_Outcome) AS rn
FROM Test
) AS D
GROUP BY id_request
ORDER BY id_request