OptionSet:
Select * from StringMap
Global OptionSet:
select os.Name, l.Label from AttributePicklistValueAsIfPublishedLogicalView av
join OptionSetAsIfPublishedLogicalView os
on av.OptionSetId = os.optionsetid
join LocalizedLabelAsIfPublishedLogicalView l
on l.ObjectId = av.AttributePicklistValueId
where os.IsGlobal = 1 and os.IsCustomOptionSet = 1
and os.Name = 'new_xxx'