Trying to read and compare result printed in serial monitor

Hello, I'm new here, so please let me know if I do anything wrong!

I'm printing results of calculations in the serial monitor and I would like something to be printed only under certain condition. The calculation stops when a result is achieved, I have only 3 calculations. For example:

Calculation 1a: There are no result
Calculation 1b: The result is x

Calculation 2a: There are no result
Calculation 2b: There are no result
Calculation 2c: The result is y

Calculation 3a: There are no result
Calculation 3b: There are no result
Calculation 3c: There are no result
No results for 3

... and so on

The point is that if I have no result at all then "No results for (whatever the number)" will be printed.

Given that I can't know the result beforehand I can't write it in the code, hence my question: Is it possible to read the output in the serial monitor and react to it maybe something like:

if(Serial.read() == "c: There are no result"){

  Serial.print("No results for ");
  Serial.println(number);

}

I hope I'm clear enough. thank you for your help

girlWithShield:
Hello, I'm new here, so please let me know if I do anything wrong!

+1 for using code tags.

girlWithShield:
Given that I can't know the result beforehand I can't write it in the code, hence my question: Is it possible to read the output in the serial monitor and react to it maybe something like:

Well, you are the one sending the result over serial. So you KNOW the results. Just use them instead of some quirky serial readback or string conversion.

if(Serial.read() == "c: There are no result"){

Serial.read returns a single character, not a complete string.

I'm not sure I understand your question.

I am not sure I understand either. I don't see how a calculation can have no result. All calculations yield a result. Please show me what you mean by a calculation having no result.