Condition Node (If/Else Statement) for Cycles?

Thank you all for the response.

@Secrop

I am not sure if I’m doing it right. It gives me a syntax error.
You can check an attempt below: I tried it twice: one with the "fac" and the other only fac
dl.dropbox.com/s/v7qmv3sfb0d3qre/blen48_if_else_in_cycles_node_editor.mp4

@CarlG

I’m not entirely sure how to use map-range since I require a hard 0-1 as an output rather than having float values (i.e. 0.1, 0.2)

@RickyBlender

You are right. They are. Thanks for pointing them out.
They work as expected but do you know how to use a hard “compare”
If X = 5, output 1. Or something.
Currently, it only has Greater than or Less Than.
So I can only perform either If X > 5 or if X <5.

dl.dropbox.com/s/9cxpkvmnp4xq7zi/blen48_if_else_in_cycles_node_editor02.jpg