When making an Extension Attribute, the goal in many cases is to either capture the output of a command and echo that information back between <result> tags, or to check the output of the command/s and, depending on the result, set a string or variable that gets echoed between the <result> tags.
So using what you posted, you can grab the version information from the sysctl command, or the output and then check what it returned in the script and set a variable. Example:
#!/bin/sh
## Run the sysctl command to check for Falcon Host, and print column 2 from the result
FHCheck=$(sysctl cs.version 2>&1 | awk '{print $2}')
## If Falcon Host is not installed, column 2 from the sysctl command is "unknown". Check to see if that was our result
if [ "$FHCheck" == "unknown" ]; then
result="Not Installed"
else
## If the output was not "unknown", set the result variable to the command's output
result="Version $FHCheck Installed"
fi
## This line is what actually gets picked up in the JSS for the Extension Attribute
echo "<result>$result</result>"
Note that I'm printing column 2 from the command's output, which, when installed, looks to be the version information. When it's not installed, its "unknown" which is a bit lucky in this case, since we can check to see if that's the result we got and go from there. It doesn't always turn out to be that simple though.
You can learn a bit about how to create your own Extension Attributes by studying some of the ones that Jamf provides in their JSS EA templates. That's how I learned some methods of making useful EAs. There are also tons of examples and user submitted ones here on JamfNation that you can grab and look at.
EDIT: Also just wanted to mention, I know nothing about Falcon Host or what it is. But, is there an associated application that gets installed into the Applications folder? If so, an EA would not be necessary since you could use the native inventory collection to build your Smart Group. I'm assuming the answer is no or you wouldn't be asking about how to create an EA.
Just keep in mind while EAs are fantastic ways of getting data, each one you make does add a little bit of overhead to your inventory collection, since it needs to run those scripts, collect the results and send them back up to the asset record with everything else that gets collected.