Hi Javier,
Thank you for bringing this issue to our attention.
The Substance Designer cooker cannot currently process strings in function graphs' 'if/else' statements, because of a limitation of the Substance Engine. This means only one of the strings will be processed when publishing the SBSAR.
We suggest using a 'Switch' node in the compositing graph instead, and doing the integer comparison in it. See example below:

On the right is the function graph for the 'Switch Grayscale' node.
We hope this is helpful. Please get back to us if you need further assistance.
Best regards,
Luca Giarrizzo