Macro that changes based on spec?

I like to use macros like this to keep my bars clutter free:

#showtooltip
/cast [nomod] Seal of Righteousness
/cast [mod:shift] Seal of Fury
/startattack

Is there ANY possibility to set a macro that can change the order based on spec?

IE in ret, SoR is first, but in Prot SoF is first?

I came across this example of a macro that casts different spells for DK depending on spec:

#showtooltip
/cast [spec:1] Death's Caress; [spec:2] Howling Blast; [spec:3] Outbreak

Apparently [spec:1] is a valid conditional. You could try playing with it.

https://wowmacros.info/general_macros.html