Você pode estar procurando por isso?:
insert into myDestTable (userid, name, value, othercolumns)
select us.userid, us.name,'myvaluefromcode', othercolumns
from users us
where us.name = 'mynamefromcode'
insert into myDestTable (userid, name, value, othercolumns)
select us.userid, us.name,'myvaluefromcode', othercolumns
from users us
where us.name = 'mynamefromcode'