Below is the sql get enum id and enum value of a enum in D365 F&O using sql.
SELECT enumidtable.NAME 'Enum Name',
enumvaluetable.enumvalue 'Enum Id',
enumvaluetable.NAME 'Enum Label'
FROM enumidtable enumIdTable
INNER JOIN enumvaluetable enumValueTable
ON enumidtable.id = enumvaluetable.enumid
WHERE enumidtable.NAME = 'BomWHSReleasePolicy'
Result of above SQL