You can wrap channel:entries
tag parameters in simple conditionals. So a conditional based on a segment variable will work.
This is just an example since I'm not entirely sure I interpreted what you're after, but should give you an idea.
{exp:channel:entries
channel="news"
limit="9"
paginate="bottom"
sort="desc"
{if segment_3}
orderby="{segment_3}"
{/if}
{if segment_3 == ""}
orderby="author_id"
{/if}
}
{title}<br>
{/exp:channel:entries}
Now that I think about it, though, since pagination is involved you will run into some troubles with this method. Because even when segment_3 is blank to begin with, segment_3 won't be blank on subsequent pages (it will by P10, P20, etc).
There are other ways to accomplish this, though. Switchee should do the trick:
{exp:switchee variable = "{segment_3}" parse="inward"}
{case default="yes"}
{exp:channel:entries
channel="news"
limit="9"
paginate="bottom"
sort="desc"
orderby="{segment_3}"
}
{title}<br>
{/exp:channel:entries}
{/case}
{!-- segment_3 is pagination or empty --}
{case value="#^P(\\d+)$#|''"}
{exp:channel:entries
channel="news"
limit="9"
paginate="bottom"
sort="desc"
orderby="author_id"
}
{title}<br>
{/exp:channel:entries}
{/case}
{/exp:switchee}
For the segment_3-based sorting to work you'd obviosuly want to be sure that segment_3 contained a valid value for the channel:entries order_by
parameter.
OR if this seems like too much segment-based tomfoolery...
Your suggestion in the comments to use GET variables is a good idea. Mo' Variables will work great for that. So with a URL of http://example.com/foo/bar?orderby=title you could do:
{exp:channel:entries
channel="news"
limit="9"
paginate="bottom"
sort="desc"
{if get:orderby}
orderby="{get:orderby}"
{/if}
}
{title}<br>
{/exp:channel:entries}