Ah, that's real easy. Let's say the solution field is called Solution and the result field is called Result, and that the right solution is "7".
So you enter this as the Result field's custom calculation script:
var solution = this.getField("Solution").valueAsString; if (solution) { if (solution=="7") { event.value = "CORRECT"; } else event.value = "WRONG"; } else event.value = "";