Handling hierarchical category independent variables
I'd suggest the following: 


3 features, one for each level main_column, sub_column1, sub_column2
2 additional features representing the hierarchical relation:


main_column/sub_column1
main_column/sub_column1/sub_column2



This way the training can select the most informative level of information between main_column, main_column/sub_column1, main_column/sub_column1/sub_column2. Depending on the data and algorithm used it might also make sense to discard rare cases for a subcategory and use a kind of "misc" category instead.