With WSO2 ESB, you can do this either via Filter Mediator or Conditional Router Mediator. There are many mediators and you can build your logic using desired mediators.
I would suggest you to go through documentation and samples.
There is one sample on Conditional Router Mediator, which will help you to understand on Conditional Router usage.
I think in your case, you should be able to use Filter mediator to compare your values via XPath operators.
For example, see the sample 156's filter mediator usage.
If you pass your values as URL parameters, you can get those URL parameters as properties.
Please note that these are just pointers for you to get started.
You can also try the WSO2 Developer Studio to create the ESB artifacts.
I hope this helps.