I analyzed his package and tweaked few options and found out that this was happening only with the default settings of lookup task which is using full cache mode. When I tried to use partial or no cache option it could finding out the matching details. So I understood its the difference in the way comparison works for these two cases.
I analyzed further and understood the reason. Apparently in full cache mode the comparison happens inside SSIS engine itself and so it does a case sensitive comparison. In contrast, during partial and no cache modes comparison takes place in T-SQL engine and so it will be case insensitive by default unless you’ve changed default setting to use a case sensitive collation instead.
So in the above scenario if you still want the comparison to work fine in the above case you need to do a small tweak to unify the casing of values before doing the comparison. This can be done by using a derived column task after the flat file source and using expression to unify the casing of values like UPPER(ColumnName). Then in the query used inside lookup task use UPPER(ColumnName) to make result in upper case. Once you do that comparison will work as intended by ignoring the actual case of the values.
See the below illustration to see it in action
The source file looks like below
And the reference table has the below data
The above screenshot clearly suggests the lookup matched all the incoming data indicating that it did a case insensitive search as the comparison was done in SQL Server.
The workaround to obtain the same functionality using full cache mode is as below
The difference here is the addition of derived column transform before the lookup to convert the input values to upper case to match those present in the reference table. This would cause the lookup to match values even when comparison takes place inside SSIS as the casing is now the same between file and table data.
This is something to take care of while working with the lookup task in SSIS.