I'm not familiar with Firebird, but here's a generic SQL solution:
select
serviceno,
(select username
from usernames
where services.user1 = usernames.code) as user1,
(select username
from usernames
where services.user2 = usernames.code) as user2,
(select username
from usernames
where services.user3 = usernames.code) as user3
from
services