If You need to skeep some part of the line based on some conditions, then I would use:

str= iif(Condition1,"someting","") & _
iif(condition2,"anyting'"") ... and so on