I have a data set with binary dependent variable, where 95% observations take value 1, and 5 % take value 0. Which regression model will be perfect in such case?
Binary logistic regression may be okay, but according to a rough rule of thumb, you should have 20 events per explanatory variable degree of freedom. (That is often expressed as events-per-variable, or EPV. But it is really events per explanatory variable degree of freedom.) See this section of the DataMethods.org Author Checklist, for example:
If you are not close to 20 EPV, you might be able to use Firth logistic regression. A Google search for that with the name of the statistical software you use should lead you to some relevant resources. HTH.