It's not possible to have conditional logic in macros to heal versus dps. Basically, anything that uses conditional logic to either select targets or spells doesn't work in combat.

This is by design to prevent a level of automation in game play which is considered unacceptable.

The best you can do is something like a macro or addon that issues you a raid warning to _tell_ you what button to press.