This is something that is much better suited for an addon (I believe the CastYeller2 addon mentioned above will do what you want). It's pretty awkward to put in a macro because macros can't watch the combat log, as far as I know. If you really wanted to, you could macro something like this:
Code:
#showtooltip
/use Holy Word: Chastise
/run local m,s="Message here",UnitAura("player","Chakra: Sanctuary");if s~=nil then SendChatMessage(m,"YELL") end
This should yell "Message here" only if you are in Sanctuary when you press the button. You can also expand this to do things like only yell when the spell is not on cooldown, but you will start pushing up against the character limit in a macro if you add too much.