This approach worked. Take notice of how trivial it is to add new role checks.
Code
Declare @Users Table(UserID Int, UserName VarChar(256))
Declare @Roles Table(RoleID Int, RoleName VarChar(256))
Declare @UserRoles Table(UserID Int, RoleID Int)
Insert Into @Roles Select 1, 'Admins'
Insert Into @Roles Select 2, 'Role2'
Insert Into @Roles Select 3, 'Role3'
Insert Into @Roles Select 4, 'Genius'
Insert Into @Users Select 1, 'Phil'
Insert Into @UserRoles Select 1, 1
Insert Into @UserRoles Select 1, 2
Insert Into @UserRoles Select 1, 3
Insert Into @UserRoles Select 1, 4
Insert Into @Users Select 2, 'Jim'
Insert Into @UserRoles Select 2, 2
Insert Into @UserRoles Select 2, 3
Insert Into @Users Select 3, 'Susan'
Insert Into @UserRoles Select 3, 1
Insert Into @UserRoles Select 3, 2
Insert Into @UserRoles Select 3, 3
Select UserID,
UserName,
Cast([Admins] As Bit) As IsAdmin,
Cast([Genius] As Bit) As IsGenius
From (
Select Users.UserID,
Users.UserName,
Roles.RoleName
From @Users As Users
Left Join @UserRoles As UserRoles On UserRoles.UserID = Users.UserID
Left Join @Roles As Roles On UserRoles.RoleID = Roles.RoleID
) As Data
Pivot (
Count(RoleName) For RoleName In (
[Admins], [Genius]
)
) As Result
Result
UserID UserName IsAdmin IsGenius
2 Jim 0 0
1 Phil 1 1
3 Susan 1 0