As Martin Smith
pointed in his comment:
Is ColumnC unique? If not you will need to add a guaranteed unique column(s) to the ORDER BY to act as a tie breaker to ensure deterministic results.
There is nothing wrong with the CTE
itself - the issue is I am not sorting by unique
column.