It’s not possible.
Macros can only make decisions about what spell to cast based on the limited available conditionals. There are not conditionals for movement (or if something is on cooldown or based on the presence or absence of buffs.) That’s to avoid people automating their rotations. Sections 3 and 4 of this sticky post cover the basics about what macros can do and what conditionals are available.
The best you can do is to set up a modifier macro. Here’s a basic one:
#showtooltip
/cast [mod:shift]Immolate;Corruption
It will cast Immolate if you hit the macro while holding the shift key, otherwise it will cast Corruption. (You can change the shift to ctrl or alt. You can also just use [mod] so it works with any modifier key.)