Well, I tried and unfortunately it didn't work, so it would seem that you're not allowed to use control flow functions with load data infile. In case the error is on my side, here's the code representing my idea for reference
LOAD DATA INFILE 'the_file.txt' IGNORE INTO TABLE the_table (@id, @col2, @col3) SET
CASE WHEN @co2 != 20
THEN id=1
ELSE id=@id
END CASE, col2=@col2, col3=@col3
Failing that approach, I would instead go with a temporary table into which you load all data, and then followup with a secondary query to perform the insert for matching rows
-- Create a temporary table with structure identical to the_table
CREATE TEMPORARY TABLE tmp_table LIKE the_table;
-- in case col2 isn't indexed in the_table, add index for col2
ALTER TABLE tmp_table ADD INDEX (col2);
-- Load data into temp table
LOAD DATA INFILE 'testdata.txt' INTO TABLE temp_table;
-- Perform insert for rows where col2=20
INSERT INTO the_table SELECT * FROM temp_table WHERE col2=20;
-- Get rid of the temp_table (otherwise done automatically when you close the connection)
DROP TABLE temp_table