The pinned topics in the UI and Macro Forum are pretty useful.
#4 under Macros: Essential Information indicates you can use a Spell ID in a conditional check.
As Elk said, you can find spell IDs on Wowhead (e.g., lookup a DK’s “Obliterate” and the spell ID is in the URL and is 49020). P.S. Obviously use Retail and not WotLK (unless you’re playing that Classic variant).