Given a string S and Q query strings(q1,q2,...), check for each query string whether or not it is sub-sequence of S
Formatting

Everything inside your class body should be indented by one step further than it currently is.
Binary operators (+,-, ...) are usually surrounded by one space to make reading them easier

Outputting results
Your if-else statement can be easily replaced by a ternary statement because it IMO is too trivial to actually be worth the effort of reading 5 lines for it.
In other cases I'd advocate against using the ternary, but here it's just so crudely obvious I can't help but recommend using it.
Immutability
It's significantly cleaner to not allow changing your reference string after you read it in. Mark effectively final variables as final explicitly to ease reading.
After applying this handful of changes your code looks as follows:
public class Query {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(new InputStreamReader(System.in));
        final String str = scanner.next();
        int n = scanner.nextInt();
        while (n-- &gt; 0) {
            String sub = scanner.next();
            System.out.println(isSub(str,sub) ? &quot;Yes&quot; : &quot;No&quot;);
        }
    }
}