I want to get list of all database users with specified role. Role is a parameter for stored procedure or function.
Somethinf like a select statement with user name
In SQL 2005 and 2008 this information is most easily accessed in two catalog views.
This query should give you the information you're looking for.
select rp.name as database_role, mp.name as database_user
from sys.database_role_members drm
join sys.database_principals rp on (drm.role_principal_id = rp.principal_id)
join sys.database_principals mp on (drm.member_principal_id = mp.principal_id)