Say you want to convert any of the following ‘1’, ‘-1’, ‘true’, ‘t’, ‘True’, ‘t’, ‘Yes’ to bit 1 and ‘0’, ‘f’, ‘false’, NULL to bit 0. How would you do that in one SQL statement? One way (special thanks to Bill Wendel who presented this solution) is this: