Question: relationship between two categorical variables can be captured?
Answer: Correlation is a measure of the linear relationship between two variables. That makes no sense with a categorical variable. You can't; at least, not if the categorical variable has more than two levels. If it has two levels, you can use point biserial correlation.