What is the effect of calorific value of a fuel on the specific impulse of a rocket engine? Other things remaining the same, and if it is possible to use both, will the same fuel provide the same specific impulse in both gaseous and liquified form?
"Other things remaining the same" is typically not true for chemical rocket fuels.
Nevertheless, the asymptotic relationship between calorific value and specific impulse is that the Isp is proportional to the square root of the energy content. This is because Isp is directly proportional to exhaust velocity, which squared is proportional to the kinetic energy of the exhaust.
What makes this more complicated in practice is that more energetic fuel will change the combustion conditions (temperature, pressure), which will cause different exhaust products (and cp/cv, calorific value, etc.), and therefore different ideal oxidiser to fuel ratios due to Isp also depending on the molecular mass of the exhaust. In propellant design these are large piles of tables of chemical equilibriums.
"Will the same fuel provide same specific impulse in both gaseous and liquified form?"
No, these will have slightly different Isp. The higher energy content of gasses generally gives a few percent better performance, at the cost of monumental engineering problems.