MYSQL Custom 'All' value for variables

I am using MYSQL datasource (Grafana v5.2.0) and a query variable sprint. I want to enable the "All" option so dashboard show All Sprint values. I want the values in "All" to be in the pipe format for example: Sprint 1| Sprint 2| Sprint 3 After reading the documentation, I am trying to pass a custom value like this: {sprint:pipe}

However its not working for my graphs - the generated SQL shows this - when All is selected it is rendering the as is

Please advice what am I doing wrong.

nm, i found what i was doing wrong. I had to enter the variable formatted as ${var_name:pipe} in my query itself and not in the variable settings . its working now!!!