Use the mana value of the creature as it last existed on the battlefield to determine whether or not you surveil.

Artwork
Loading artwork…
Consuming Ashes
Outlaws of Thunder Junction · #83 · EN
Nonfoil—Foil—
Card rules
Exile target creature. If it had mana value 3 or less, surveil 2. (Look at the top two cards of your library, then put any number of them into your graveyard and the rest on top of your library in any order.)
The enforcer only got halfway through the arrest warrant before it—and he—went up in smoke.
Common · Illustrated by Campbell White
Format legality
Brawl Legal
Commander Legal
Competitive Brawl Legal
Duel Legal
Gladiator Legal
Historic Legal
Legacy Legal
Modern Legal
Oathbreaker Legal
Pauper Legal
Pauper Commander Legal
Penny Legal
Pioneer Legal
Standard Legal
Standard Brawl Legal
Timeless Legal
Vintage Legal
Alchemy Not Legal
Future Not Legal
Old School Not Legal
PreDH Not Legal
Premodern Not Legal
Tlr Not Legal
Rulings
Published rulings from the downloaded Scryfall catalog. Source card record · Rules and interactions
If the target creature has X in its mana cost, X is 0 for the purpose of determining its mana value.
If the target creature is an illegal target as Consuming Ashes tries to resolve, it won’t resolve and none of its effects will happen. You won’t surveil.