SELECT id, name, cat FROM table
SET @i := 0; SELECT id, sait, @i := @i + 1 AS row_number from vacancy where sait = IF(@i%2=0, 1, 2) limit 10;