I'm doing a query that counts % of https entries in a log. I can do it using
IF(url LIKE 'https%', 'https', 'http')
IF(substr(url, 1, 5) = 'https', 'https', 'http')
Both work functionally, In my opinion the first one is more readable.
However I suggest you run a test and see if there is any significant performance difference between the two. Otherwise, just pick your favourite.