Code:
<xen:if is="{$visitor.user_group_id} == 3">
Hi Administrator.
</xen:if>
Note that user_group_id only stores the primary usergroup id of a user; so you are only comparing the primary usergroup in the code above. Secondary usergroup id's are stored as a comma separated list in the secondary_group_ids field; but I haven't come across any native template helper that we can use here.
@dmnkhhn:
Interesting approach. Off to try it right now.