No, you can't do this. You cannot use CFML to built another CFML statement at runtime. All the CFML needs to be compiled before it's executed, so seen in that light you can probably see how what you're trying can't possibly work.
You need to have the code all present and correct at compile time, so it can be compiled, and then it can be executed.
So something like this:
<cfif foo2 IS "">
<cfset foo = 0>
<cfelse>
<cfset foo = foo3>
</cfif>
Obviously this is just your example, and your actual requirement is different, but the key thing here is to understand the difference between compile-time and runtime.
--
Adam