depends on your sygwin install but you should have which command to help.
It may depends on your shell (which should be bash by default)
then in this case :
# which sed > /dev/null 2> /dev/null
(will return 0 if found 1 if not)
you have to test then var $? to check this result with if command (like if [ $? != 0 ] ; then ...)