How to order by clause on distinct select stament condition value
Since ORDER BY is executed after SELECT you can use the alias that you've defined in your SELECT clause.

ORDER BY ArtHeelNo

Another (less recommended) option would be to just order by the number of the column

ORDER BY 2


It's also possible to just repeat the statements in your ORDER BY, this is less recommended since if your statement would change, you have to change it twice. It's also a lot messier to read.

`ORDER BY (CASE WHEN (BASE_Art.ArtId IS NOT NULL AND BASE_Heel.HeelId IS NULL) THEN BASE_Art.ArtNo                              ELSE (CASE WHEN (BASE_Art.ArtId IS NULL AND BASE_Heel.HeelId IS NOT NULL)                               THEN BASE_Heel.HeelNo ELSE (BASE_Art.ArtNo + '-' + BASE_Heel.HeelNo) END)END)`