Overriding variables based on url
Assuming I've parsed this all out correctly, you should be able to achieve what you're looking for using Rules. You'll need to install core's PHP Formatter for its integration with Rules to call variable_set() as an action, though beyond that it's pretty straightforward:


Event: When cron maintenance tasks are performed
Condition: Data comparison (Parameter: Data to compare: [site:url], Data value: http://example.foo.edu/) 
Action: Execute custom PHP code (Code: variable_set('cas_server', 'auth.example.edu');)


Mind the trailing slash in the condition URLs - it's the path to the home page, not the domain name, so the slash is required.

Of course, you could bind it to whatever event you feel is most appropriate, and duplicate the same rule for your dev and test instances with the appropriate CAS servers (going this route would also mean you could export this with Features). I've tested the above reaction rule, and it seems to work on my own D7 instance (with the URL condition set accordingly):

# After cron
[dmw@seraph aqueduct]$ drush vget cas
cas_server: "auth.example.edu"


It's been a while since I've used the old Rules, though I don't see why something similar can't work for D6.