If your column was called "col" and your table was called "table", I would try something like this:
WITH Indexes AS (
SELECT
ROW_NUMBER() OVER (PARTITION BY col ORDER BY col) as __row,
col
FROM table)
SELECT col
FROM Indexes
ORDER BY __row, col;
source
share