Pokemon: Super Mystery Dungeon uses a quiz to determine your starter. The answers you give directly impact which starting Pokemon the game assigns you. What answers map to which Pokemon? How can I get a riolu?
First off, Super Mystery Dungeon lets you just pick any Pokemon you want. At the end of the quiz it will tell you which Pokemon it selected for you, but you can just say no, and pick from any of the 20 starting Pokemon you want. If you just want to start with Riolu, that's the easiest way.
If you really want to go through the personality quiz, then (according to this Super Mystery Dungeon Quiz Guide), the two questions that are relevant in picking your 2 starting Pokemon (player and partner) are the sixth and seventh question.
For the sixth question, the game picks one of five possible questions, giving you four options for which Pokemon you want to be:
A wizard appears before you! He says he'll transform you into anything! What would you want to be?
- Pikachu: A cute little critter, beloved by all!
- Charmander: A cold-blooded reptile with strength.
- Torchic: A freewheeling bird that wings across the sky!
- Riolu: A wild beast that is one with nature.
All right! It's snack time! And today we've got...cake! Woo-hoo! What kind of cake do you pick?
- Oshawott: Simple-but-sweet strawberry shortcake.
- Fennekin: Rich and creamy cheesecake.
- Snivy: Measured and mature green-tea mousse.
- Chespin: Classic chestnut-cream confection.
Spring, summer, fall, or winter... Which season do you like best?
- Chikorita: Spring, the season of buds and blooms!
- Bulbasaur: Summer, the time for sea and sand!
- Turtwig: Fall, when crickets chirp and dusk comes early.
- Totodile: Winter, when a blanket of snow covers all.
We're going to the beach! Best. Day. Ever. Time to kick back and enjoy the breeze. What view do you find yourself staring at?
- Piplup: The glittering blue stretch of sea.
- Froakie: The endless expanse of the sky.
- Chimchar: The sandy shore being lapped by waves.
- Treecko: The gently swaying strands of dune grass.
You've been given a piece of blank drawing paper! You're asked to draw a picture of the ocean. What color do you make it?
- Cyndaquil: Brilliant green with tropical corals.
- Squirtle: Bright blue with crystal-clear water.
- Tepig: Glimmering orange to reflect the sunset.
- Mudkip: Rich cobalt blue to show great depth.
The seventh question is always the same question, about music, but the game selects four out of 20 possible answers, each one selecting a different partner Pokemon:
- Oshawott: Can't sit still. Time to polka!
- Froakie: Feelin cool, so it's time for some jazz!
- Chespin: Getting excited! Time to samba!
- Riolu: Gotta get moving with some EDM!
- Treecko: I don't need anybody. I'll listen to a solo.
- Fennekin: I wanna dance and sing to some pop music!
- Bulbasaur: I want to listen to some golden oldies.
- Tepig: I want to loudly sing anime theme songs!
- Pikachu: I'll rock out to some hard rock!
- Torchic: I'm feeling laid back. Time for some folk.
- Squirtle: I'm in the mood for a sophisticated waltz.
- Totodile: I'm in the mood for dramatic opera.
- Piplup: I'm in the mood for some happy pop music.
- Chikorita: I'm in the mood to sing in a chorus with friends.
- Snivy: I'm stuck in a rut. Time to do the tango!
- Chimchar: Punk rock that makes your spirit explode!
- Charmander: So much to do! I need marching music!
- Turtwig: The freshest, latest rap to make my fingers snap.
- Cyndaquil: Time to sip some tea and listen to classical.
- Mudkip: Time for some pleasant, happy reggae.
If you specifically want Riolu, you have two options: first, if you get the question 6 that starts "A wizard appears before you!", pick "A wild beast that is one with nature." If not, on question 7, pick the answer that says "Gotta get moving with some EDM" to get Riolu as a partner. If you don't get either of these options, again, you can always just reject the choice the game makes for you and pick Riolu directly at the end.
So the starter Pokemon you get is determined by two factors: your personality type and your gender. The exact Pokemon differs from game to game, so here's the chart for Red and Blue Rescue Team:
You'll see that if you answered questions matching a Docile personality and you selected the male option at gender determination, you'll be a Bulbasaur in the game. Each game has different quiz questions, so you'll have to look at a particular guide if you want information for a specific game.