We present a method based on a level set formulation to reproduce the behavior of the contact line on solid walls in the simulation of 3D unsteady interfacial flows characterized by large density ratios. The level set method poses a particular difficulty, related to the reinitialization procedure, when used in the simulation of interfacial flows in which the interface intersects a solid wall, due to the appearance of a blind zone where standard reinitialization procedures produce inconsistent results. The proposed method overcomes this difficulty by introducing a boundary condition for the level set function on the solid surface based on the normal extension of the contact angle from the interface along the solid wall. In order to reproduce the dynamics of the contact line we use a simplified model that imposes a boundary condition on the interface curvature based on the static contact angle, and define a thin slip zone at the solid wall around the contact line. To assess the accuracy and robustness of the proposed method, we conducted several preliminary numerical tests in three dimensions, whose results are compared with analytical solutions and other results available in the literature.