-- вариант 1
SELECT s.id, s.Column1, s.Column2
FROM (
SELECT t.id, t.Column1, t.Column2, RN = ROW_NUMBER() OVER (PARTITION BY t.Column2 ORDER BY id ASC)
FROM test1 AS t
) S
WHERE S.RN = 1
-- вариант 2 с CTE
;WITH S AS (
SELECT t.id, t.Column1, t.Column2, RN = ROW_NUMBER() OVER (PARTITION BY t.Column2 ORDER BY id ASC)
FROM test1 AS t
)
SELECT s.id, s.Column1, s.Column2
FROM s
WHERE S.RN = 1