I could not find anything specific about this, but does SQL-Alchemy support the MSSQL-IIF function?
Inside the docs I could not find any info for this and I guess I have to use the case-when block or a simple if instead?
It seems that SQLAlchemy does not support IIF for SqlServer. The function is equal to the IF Function in MySQL but SqlAlchemy does not recognize this difference. Instead a case when then block can be used as an alternative to func.IF.