Hash keys are never guaranteed to be in order, so selecting based on a number will not work to get you your middle keys.
If your keys are really all single letters, this will work (note that you'll have to either stringify the values or do hex work on them if they are indeed hex):
#!/usr/bin/perl
use warnings;
use strict;
my %hash = (
a => 00,
b => 01,
c => 02,
d => 03,
e => 04,
f => 05,
g => 06
);
my @keys = ('c'..'f');
print $hash{$keys[int(rand(@keys))]} . "\n";
However, I doubt this is your real info. Can you supply us with real data if this isn't it? If your hash isn't exactly what you've shown here, the answers you are provided with are unlikely to work with a hash with keys that are not a single letter, or values that are not sequential.