If you want to persist different values types to the database in a single table similar to the one in your question, you can do it like this:
public interface IHasValue<T> {
T Value { get; set; }
}
public abstract class Foo {
public Guid Id { get; set; }
public string Statement { get; set; }
}
public class Foostring : Foo, IHasValue<string> {
string Value { get; set; }
}
public class FooInt : Foo, IHasValue<int> {
int Value { get; set; }
}
In your DbContext class add properties:
public DbSet<FooString> FooStrings { get; set: }
public DbSet<FooInt> FooInts { get; set; }
You can set the column names for the table in the OnModelCreating method of your DbContext:
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
// include the base class so a single table is created for the hierarchy
// rather than a table for each child class
modelBuilder.Entity<Foo>().ToTable("Foos");
// Specify the column names or you will get weird names
modelBuilder.Entity<FooString>().Property(entity => entity.Value)
.HasColumnName("ValueAsString");
modelBuilder.Entity<FooInt>().Property(entity => entity.Value)
.HasColumnName("ValueAsInt");
}
This code will generate a table Foos with columns Id, Statement, Discriminator, ValueAsString and ValueAsInt. More info on the Discrimiator column can be found here

You still need to create a class for each Type/column you want to use for T, I don't think you can get around that.