"It was only a security cheque" is the most common defence in these cases and one of the least successful, because it is argued as if it were a rule of law. It is not.
The presumption starts against the drawer
Once the signature is admitted or proved, Sections 118 and 139 of the Negotiable Instruments Act raise a presumption that the cheque was drawn for consideration and for the discharge of a legally enforceable debt or liability. The burden then shifts to the accused to rebut it, on the balance of probabilities.
What "security" actually has to mean
The question is narrow: on the date the cheque was presented, was there a legally enforceable debt or liability? If yes, Section 138 applies even though the cheque was originally handed over as security. The defence only works where the accused shows there was no subsisting liability when the cheque was banked, because the loan had been repaid, or the obligation had not yet arisen.
A cheque signed and handed over blank, later filled in by the holder for the amount due, is not automatically outside Section 138. Courts have upheld complaints on such cheques where the underlying liability was proved. What defeats the complaint is proof that the amount filled in exceeded the actual liability.
If you are the complainant
Keep the underlying transaction documented, because that is where this defence is answered. The loan agreement, the invoice, the ledger, the bank transfer of the principal, the acknowledgement of balance. The cheque proves the instrument; the paperwork proves the debt.
If you are the accused
Reply to the demand notice, properly and in time, setting out your actual case. A reply raising the security defence contemporaneously is worth a great deal more at trial than the same defence raised for the first time in evidence, two years later.