I've seen this question: Select query but show the result from record number 3
Table
|id| foo | bar |
-------------------------
|1 | aaa | 123 |
|2 | bbb | 234 |
|3 | ccc | 345 |
|4 | ddd | 456 |
based on the link above I use the query
SELECT *
FROM Table
ORDER BY (id = 3) DESC
and the result is
|id| foo | bar |
-------------------------
|3 | ccc | 345 |
|1 | aaa | 123 |
|2 | bbb | 234 |
|4 | ddd | 456 |
So my question is, is there any way to show the result starts from record number 3,then 4, then 1 and the last is record number 2? So the result can be shown as follow:
|id| foo | bar |
-------------------------
|3 | ccc | 345 |
|4 | ddd | 456 |
|1 | aaa | 123 |
|2 | bbb | 234 |
My example above is only a model, my goal is how to sort the result from the record I choose to the max record then cycling to the first record. If I choose record number 3 then the result is
3,4,5,...,max,1,2
Is it possible?