How to sort rows to appear alternating (e.g. A B A B ... )?
Try this:

CREATE TABLE SortTest (val char(1))

INSERT INTO SortTest VALUES 
('A'),
('A'),
('A'),
('B'),
('B'),
('B')

SELECT val
FROM SortTest
ORDER BY row_number() OVER (PARTITION BY val ORDER BY val), val