Existence results for a mixed boundary value problem with Sturm-Liouville equation