Imagine you want to execute a certain SSIS Control Flow step depending on the result of a query (e.g. you want to execute a step only if a table is empty, that means select count(*)... = 0). Take a look at the following figure. In our sample we want to execute step "Execute SQL Task 1" only if the query in "Execute SQL Task" return 5.
The first step is to create the query that reads the base value for the expression. In our case this is done in step "Execute SQL Task". Important: Set ResultSet to "Single row"!
The important thing is that we assign the result of the query shown above to a variable (here called User::NumberOfRows).
Now you can use the "Precedence Constraint Editor" (doubleclick on the arrow between the two steps) to tell SSIS under which condition the second step should be executed: