chi square test vs logistic regression result If I use both chi square test and logistic regression are the result will be the same in terms of P-value and numbers?

Logistic regression and Pearson's $\chi^2$ are only comparable under a very restrictive setting in which there is a single predictor and it is categorical, as well as assuming the outcome is a binary or unordered categorical response.  So stick to that setting and consider the three types of test statistics arising from regression models using maximum likelihood estimation (such as the logistic model): Wald test (based on parameter estimates and their standard errors in simple cases), Rao efficient score tests, and likelihood ratio $\chi^2$ tests.  The score test from binary or polytomous logistic regression models is identical to the Pearson $\chi^2$ test statistic.
