Question on SQL Scripts

I am trying to write a script to have Permission scheme and related details showing up like Permission type, who has been given permission and all.

select NAME, perm_parameter,perm_type, Permission_Key
FROM schemepermissions SP
INNER JOIN permissionscheme PS ON SP.scheme =

The script to a certain extent given the desired result. However, in the perm_parameter table, there are few Ids included, I understand that the original table contains them. However, how do I replace them and I need the exact permission parameter that suits them. Please advice