If legal and equitable claims are tried in the same case most courts allow the case to be tried by a jury. Some states try the legal portion by jury and allow the judge to rule on the equitable portion of the case. If an equitable defense is presented in a legal proceeding with respect to the right to try the case by jury most state courts try the equitable defense by judge and then allow a jury trial on any issues that remain at law.
Federal courts state that the equitable defenses merge with the legal claim and everything may be tried by jury. When a legal defense is presented in an equitable proceeding in federal court the legal defense is tried first by a jury and then the judge determines any equitable claims remaining. Most states follow the federal courts with respect to this issue.