If I understand you right, you're going to need some sort of flag to say which agent got the last order. It's difficult to say without understanding more about your application logic but you could, for example, store the name of the last agent to receive an order in an application variable
each time you place an order. Then you just need to retrieve that variable each time, apply some simple logic to get the name of the next agent, and use that in your SELECT statement. Make sense?