For past few decades, Enhanced Oil Recovery (EOR) has been posing an exigent task for researchers in oil and gas industry. Traditionally for many geological formations, water and gas are used as displacing fluids for oil recovery. More recently foam–a dispersion of liquid in gas–has proved to be highly successful than traditional fluid displacement methods to recover trapped oil in the porous rock. Foam increases oil displacement efficiency by controlling gas mobility and gravity override. In this work oil recovery efficiency using water, gas and foam flooding is compared. To determine optimal oil recovery scenario, we perform numerical modelling for two-phase immiscible flows in porous media and perform simulations to determine oil recovery from water, gas and foam flooding. 2D two-phase and three-phase flow models are created in COMSOL and effects of viscous instabilities and permeability of different ground layers on recovery factor are investigated.