To use the Scalar Query Expression, please check the example found in the docs.
Then it would be easy to use the field were the expression was applied in a sortExpression.
e.g. SortExpression sorter = new SortExpression(fields[1] | SortOperator.Descending);
And pass this to the fetch method.