Mail from awk

Hi,

I need to write a single line command which will check whether input variable is 0 or 1. if it is 0 then it should send a mail without attachment else it should send mail with attachment.

I have to write in single line command. is there any way in awk?

Please help me..
Any help on this pls...

thanks,
Raja.