I don't believe there's a way to determine which spec you're in (out of the 3 possible class specs) within a macro, although it might be possible with LUA code of some sort. That's beyond my knowledge.
However, there's a very simple macro conditional for determining your active spec of your 2 'equipped' specs. For example, if Destruction is your main spec, you can add [spec:1] to the spell you want to cast in Destruction and [spec:2] to the spell you want to cast in your alt spec.
Edit: Just thought I'd give an example. I play Resto/Enh and want a mouseover macro for dispelling, so I use something like this:
Code:
#showtooltip
/use [@mouseover, harm, nodead][harm, nodead] Purge
/use [@mouseover, help, nodead, spec:1][spec:1] Purify Spirit
/use [@mouseover, help, nodead, spec:2][spec:2] Cleanse Spirit
That Purges an enemy, regardless of the spec, if it's my mouseover or my target, and dispels a friendly mouseover or target, using Purify in Resto spec (my main spec) and Cleanse in Enh (my alt spec).