you need to use OrderExpression to sort the return result...
following is example from SDK which retrives account sorted based on address1_city,address1_county..
hope this helps..
// For example, you can sort the accountnumber attribute in descending order,
and the address1_city attribute in ascending order.
///The following example demonstrates how to use the
//QueryByAttribute.Orders property.
// Create the QueryByAttribute object.
QueryByAttribute query = new QueryByAttribute();
query.ColumnSet = new AllColumns();
query.EntityName = EntityName.account.ToString();
// Set the order of returned accounts.
OrderExpression oe = new OrderExpression();
oe.AttributeName = "address1_city";
oe.OrderType = OrderType.Ascending;
OrderExpression oe1 = new OrderExpression();
oe1.AttributeName = "address1_county";
oe1.OrderType = OrderType.Ascending;
query.Orders = new OrderExpression[]{oe, oe1};