If a defendant claims to be entitled to any equitable estate or right, or to relief on any equitable ground against any deed, instrument or contract, or against any right, title or claim asserted by any plaintiff or petitioner in the cause or matter, or alleges any ground of equitable defence to any such claim of the plaintiff or petitioner, the Supreme Court or the Judge shall give to every equitable estate, right or ground of relief so claimed, and to every equitable defence so alleged, the same effect by way of defence against the claim of the plaintiff or petitioner, as the English Court of Chancery ought, immediately before the commencement of the Judicature Act, to have given if the like matters had been relied on by way of defence in any suit or proceeding instituted in that Court for the like purpose.