I guess the simplest way would be
Code:

select
case @WKSTA='comp1'
$rc=addprinterconnection('\\server\printer1')
caes @WKSTA='comp2'
$rc=addprinterconnection('\\server\printer2')
case 1
endselect

_________________________
There are two types of vessels, submarines and targets.