IF condition to compare file prefix

I have files with naming as below,
testS123,
testS223,
testB1,
testC1,
testD1

I need to write a if condition to print 'Hello' when the file prefix is not testS* else 'Good bye'.

if [ $file not like file prefix testS* ]
then
echo "Hello"
else
echo "Good bye"
fi;

Try

[ "${file:0:5}" == "testS" ] && echo "Hello" || echo "Good Bye"

. May depend on your shell.