Different sociologists have different opinions on this question, so there is no possibility of finding one right answer. My own view is that Max Weber's view is the most relevant. His view is a symbolic interactionist one that says that we base our actions on our perceptions of the meaning of the world.
I think that we do this all the time. For example, when we decide how we feel about crime, we base that on what we think the cause of crime is. If we think that crime is caused by inequality, we try to reduce that inequality. If we think that crime is caused by people making bad choices and having bad values, we support more punitive solutions to crime.
Weber's perspective, then, seems to me to approximate our ways of choosing how to act.