In this Chartio data tutorial, learn how to use If... then logic in SQL Server for real-time programmatic logic on the values within your query. In this Chartio data tutorial, learn how to use If... then logic in SQL Server for real-time programmatic logic on the values within your query.