SetupEntityAccess represents the enabled setup entity access settings (such as for Apex classes) for the parent PermissionSet. To grant users access to an entity, associate the appropriate SetupEntityAccess record with a PermissionSet that’s assigned to a user. This object is available in API version 25.0 and later.
Sample SOQL:
SELECT Id, ParentId, Parent.Name, SetupEntityId FROM SetupEntityAccess
Cheers!!!