ans is 4.critical load of column is based on end conditions of the column ie effective length of column..6 cases are there for the column load formula.u have to remember these cases.
take moment due to load p on the top free end,a d.e will arrive which you will have to solve applying b.c's..and proceed..the derivation is very tidious