Switch case or if?

Hi,
I have a sensor input from modbus reading 1-3 which I need to convert to OFF, HEAT and COOL for a climate component. But I simply cannot get my head around doing just that using templates…

I have tried switch case and now I am at if statements which isn’t working. For sure I am doing something retarded…

  - platform: modbus_controller
    modbus_controller_id: sentio_modbus_controller
    name: "${channel_1} mode"
    id: mode_channel_1
    register_type: read
    address: 102
    lambda: !lambda |-
   ????

Best regards,
Mogens