you can compare your string with the function "EQ_STRING" out of the Firmware library.
Attached an example screenshot for your application.
Edit: As alternative you can change your sms in the way to have a numeric value at the end. Like "Motor 1 State:0" and "Motor 1 State:1". This string can be easily cut and the last
character changed into a boolean.